package com.chiry.enjoyandroid.gson;

import com.google.gson.annotations.Expose;
/**
 * @author fyx
 * @version 1.0
 * @date 2021/8/27 17:44
 */


/**
 * Expose:
 *     serialize 为 false 代表不进行序列化
 *     deserialize 为false 代表 不进行反序列化
 *
 *  由于序列化时 排除某些 属性
 *
 * 需要建立在 GsonBuilder下才会起作用
 *    注意 在 未使用@Expose在反序列化时 会被忽视
 * 具有一定的缺陷性
 *
 * @author sunRainAmazing
 * */
public class User {
    public User() {
    }

    public User(String name, String nickName, String email, String mobile, String info) {
        this.name = name;
        this.nickName = nickName;
        this.email = email;
        this.mobile = mobile;
        this.info = info;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    private String name;
    @Expose
    private String nickName;
    @Expose(serialize = false)
    private String email;
    @Expose(deserialize = false)
    private String mobile;
    @Expose(serialize = false, deserialize = false)
    private String info;

}
